package com.hl.web;

import com.hl.service.SearchService;
import com.hl.service.ZixunshiPageService;
import com.hl.util.GeneralResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/search")
public class FristSearchController {
    @Autowired
    private SearchService searchService;
    @RequestMapping("/searchkey")
    public GeneralResult searchkey(@RequestBody Map<String,String> keyword) {
        String keyword2 = keyword.get("keyword");
        return GeneralResult.success("请求成功", searchService.search(keyword2));
    }
}
